1. Field of the Invention
The present invention generally relates to the transmission of data to and from peripheral devices coupled to a computer system and more particularly to a method and a system for more direct communication to and from a peripheral device coupled to a computer system via a Universal Serial Bus.
2. Background of the Invention
Universal Serial Bus (USB) is a computer hardware interface for peripheral devices such as keyboards, mice, printers, and scanners. The USB-1 technology that appeared in consumer products in the late 1990's has recently been superseded by a USB-2 specification. The Universal Serial Bus Specification, Revision 2.0, dated Apr. 27, 2000 (USB-2), was written by a consortium of technology companies to improve the capabilities of USB technology and is incorporated herein by reference.
A typical configuration for coupling a peripheral device to a computer via USB technology is shown in FIG. 1. A CPU 2 is coupled to a host controller 4 which is coupled to a USB hub 6 which in turn is coupled to one or more peripheral devices 8. The host controller 4 is generally a device that processes data transactions between the CPU 2 and peripheral devices 8. Host controller interfaces used with USB-1 technology include Universal Host Controller Interface (UHCI) and Open Host Controller Interface (OHCI). An Enhanced Host Controller Interface (EHCI) has been developed for use with USB-2. A detailed description of the typical EHCI technology can be found in the Intel Corporation document Enhanced Host Controller Interface for Universal Serial Bus, Revision 1.0, dated Mar. 12, 2002, which is incorporated herein by reference.
With USB-1 technology, a frame of data is sent every one millisecond. The reading and writing process can thus consume a considerable amount of time when multiple frames are transmitted. As a result, USB-1 is not particularly amenable to the real-time control of devices.
USB-2 was designed as an improvement over USB-1 in part because it reduces the data frame transmission rate to 125 microseconds by creating eight subframes or microframes in each one-millisecond frame. The overriding one-millisecond frame structure still exists but each frame is broken into eight subpieces. Also, instead of running at the 12 megabit per second data transmission rate used by USB-1, USB-2 runs at 480 megabits per second. Thus, USB-2 is considerably faster than USB-1.
Even in USB-2, however, time delays still exist in the communications with peripherals in that the reading and writing processes still require calling a driver. These drivers generally determine the work to be done and place the appropriate instructions (often called transfer descriptors) in an appropriate queue to be accessed by the host controller. The transfer descriptor then waits in memory until the host controller completes processing all other requests ahead of the transfer descriptor in the queue. The host controller then generally determines what needs to be done, does it, and records that it has been done.
This standard communication process is adequate for routine tasks such as sending a file of data but the number of steps that must be taken, the delay in a transfer descriptor progressing through the queue, and the latency involved in multiple memory fetches make this a poor structure for real-time control of devices.